package com.life.ai.server.common.utils;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;

import java.util.Date;

/**
 * DateUtils
 *
 * @author kylewka
 * @since 2023/11/18
 */
public class DateUtils extends DateUtil {

    /**
     * 重写
     *
     * @param date date
     * @return int
     */
    public static int dayOfWeekCH(Date date) {
        int num = DateTime.of(date).dayOfWeek();
        num--;
        if (num == 0) {
            return 7;
        }
        return num;
    }

}
